codeblocks

How to remove command line from a compiled program?

本小妞迷上赌 提交于 2019-12-24 10:46:42
问题 I have recently started a tutorial to learn how to code GUI using Windows API and I have come upon an unexpected question which I think is kind of silly. I am using Code::Blocks with OpenWatcom compiler as default and I have created a simple GUI program compiling and linking well. The problem is when I try to launch the program, even from the release version something like the command line shows up behind the window of my program, like I tried to run it through the compile & run option of the

Help using PCRE in C++

一笑奈何 提交于 2019-12-24 09:32:38
问题 this is my first time trying to build a C++ application, so I'm kind of lost. I've looked at some examples but I still dont really know what's wrong. #include <iostream> #include <stdio.h> #include <windows.h> #include <pcrecpp.h> #include <string> #include <cstring> using namespace std; int main() { char title[256]; char url[256]; string song, diff; HWND hwnd = FindWindow("WindowsForms10.Window.8.app.0.33c0d9d", NULL); GetWindowTextA(hwnd, title, 255); pcrecpp::RE re("^osu! - (.*) \\[(.*)\\]

How can I set up a GTK+ Project in Code::Blocks if gtk doesn't have the right subfolders?

拜拜、爱过 提交于 2019-12-24 08:58:46
问题 I'm following this tutorial on how to set up a GTK+ project on Code::Blocks 16.01. The link in Step 1 to download GTK+ doesn't work, so I instead did a "Open in Desktop" from the Gtk Github repository. When doing Step 3 and giving the path for the location GTK, I get this error: The path you entered seems valid, but the wizard can't locate the include directory. The wizard cannot continue. When I look back at the repository, I see there is no "include" or "lib" subfolder that is needed to

Linking GoogleTest and CodeBlocks

大憨熊 提交于 2019-12-24 07:38:12
问题 I'm afraid that it is a basic problem, I might have found the answer with other IDEs but not with CodeBlocks =( I try to use GoogleTest. I downloaded the project, built it with cmake -G "CodeBlocks - Unix Makefiles" (I'm on Ubuntu) That gave me the libgtest.a and libgtest_main.a files that I transfered in /usr/lib And I think my lacks are on the last step : linking GoogleTest and CodeBlocks. Some tutorials told to add the "-lgtest" linker option, I tried many things but it's all the same :

Code::Blocks 10.05 Undefined reference to function

拈花ヽ惹草 提交于 2019-12-24 05:22:33
问题 I'm currently doing simple class example using Code::Blocks IDE 10.04. On creating new class I encounter undefined reference to myClass::myClass() error. Help me on figuring the error. myclass.h: #ifndef MYCLASS_H #define MYCLASS_H #include<string> #include<iostream> using namespace std; class myClass { public: myClass(); void showMessage(); virtual ~myClass(); protected: private: string myString; int integer; }; #endif // MYCLASS_H myclass.cpp: #include "E:\IOE\VII\Elective-DM\Assignment 2

Compiling with a multi-precision math library in C using Code::Blocks on Windows

吃可爱长大的小学妹 提交于 2019-12-24 02:18:06
问题 I'm having a lot of trouble figuring out how to do this. I need an arbitrary precision library for math in C. I'm good with either CLN or PARI/GP, both of which I've installed. I'm using Windows, so I had to do this via Cygwin, and ran the ./Configure files, followed by make install. Everything's built, but I cannot figure out how to link it all and use it. I'm using Code::Blocks, and anytime I try to include the necessary header files, there are loads of errors. I also link the .a file with

How to add Eigen library to c++ project

依然范特西╮ 提交于 2019-12-24 02:05:13
问题 Probably a dumb / simple question, but I have not been able to find an answer. I have no clue how adding libraries works with CodeBlocks c++. I downloaded the .zip file from http://eigen.tuxfamily.org/index.php?title=Main_Page and extracted the files into my directory. How can I use this library now in my project? 回答1: It's a template library. You can put it anywhere as long as it's in the path (accessible). Just include the proper headers and it should work. No need to link anything,

Undefined reference to curl objects

大兔子大兔子 提交于 2019-12-24 00:37:19
问题 (EDITED) I'm trying to get curl to call information from a webpage for weeks and I get the seemingly common error where my program is unable to identify curl objects: C:/Users/.../CurlAttempt/CurlAttempt1.cpp:25: undefined reference to `_imp__curl_global_init' C:/Users/.../CurlAttempt/CurlAttempt1.cpp:26: undefined reference to `_imp__curl_easy_init' C:/Users/.../CurlAttempt/CurlAttempt1.cpp:28: undefined reference to `_imp__curl_easy_setopt' collect2.exe: error: ld returned 1 exit status I

How to enable C autocomplete in Code::Blocks?

为君一笑 提交于 2019-12-23 19:10:56
问题 How to enable C Std lib functions autocomplete in Code::Blocks? 回答1: Go to Settings > Editor > Code-Completion and Symbols Browser and make sure Disable code-completion isn't checked. 回答2: Code completion should include member functions autocomplete also. Where as I couldn't see it working. Suppose I want to access the member functions of stringstream class. It is not coming up automatically when I try to access it using the object of stringstream. e.g, stringstream str; str. // nothing comes

How to debug in Codeblocks?

穿精又带淫゛_ 提交于 2019-12-23 09:34:54
问题 I just finished coding my program but am facing a few logic errors. I want to debug the program. I am using Codeblocks, so what do I need to do to view the status and value of every variable as the program goes on, and go through the program line by line? I basically want to do the thing you do in Visual Studio - where the value and address of EVERY variable is displayed as you go through line by line. I also want the CodeBlocks to show what line is currently being executed. Does anyone know