codeblocks

Code::Blocks - how to compile multiple source files

╄→гoц情女王★ 提交于 2019-12-17 07:38:05
问题 I'm trying to compile a program with multiple source files - two CPP files and a header file, with code::blocks. As an example, I have created the following three files (an example program created by someone else on another forum): main.cpp: #include <stdio.h> #include "other.h" int main (void) { printf("%d\n", getfavoritenumber()); return 0; } other.cpp #include "other.h" int getfavoritenumber(void) { return 3; } other.h #ifndef _OTHER_H_ #define _OTHER_H_ int getfavoritenumber(void); #endif

Program can't find libgcc_s_dw2-1.dll [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-17 07:24:00
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: The program can't start because libgcc_s_dw2-1.dll is missing I'm using Code::Blocks and MinGW 4.4 (I think) compiler to create a C++ project. I get this system error if I run it from its directory, but not from within Code::Blocks. The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem. In this post hardmath said to add -static-libgcc

Program can't find libgcc_s_dw2-1.dll [duplicate]

久未见 提交于 2019-12-17 07:23:28
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: The program can't start because libgcc_s_dw2-1.dll is missing I'm using Code::Blocks and MinGW 4.4 (I think) compiler to create a C++ project. I get this system error if I run it from its directory, but not from within Code::Blocks. The program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem. In this post hardmath said to add -static-libgcc

Code::Blocks error multiple definition of 'main'

夙愿已清 提交于 2019-12-14 04:12:19
问题 i tried to install my first program but it doesnt run. As the default program runs correctly. I created the new file as File>new>empty file and saved as .cpp but the program doesnt run. Ive matched the program from the book and the default one.. What is wrong 回答1: you can only have one main. By removing the Untitled.cpp file you will only have one file, main.cpp. you give your new file a name instead of taking the default name "Untitled.cpp". Or you can simply create an new project 来源: https:

what does /** mean in c++

陌路散爱 提交于 2019-12-14 01:44:59
问题 I was trying to add a block comment in c++, but I made a type-o and wrote /** instead of /* . I noticed that the comment inside got in bold. Does anyone know what it means? 回答1: This form of comment is used by Doxygen - This software enables one to generate documentation for the source code. Please see the web site. I guess your IDE understands this. 回答2: To expand on the Doxygen and JavaDoc answers. These are the special comment blocks, that your editor may be able to detect. /** * ...

Overcome DLL Hell with Code::Blocks

十年热恋 提交于 2019-12-13 22:21:54
问题 I'm using Code::Blocks for a project. I have not used an IDE on Linux in years, so I'm a bit out of touch with Linux IDEs. I'm working with an OpenSSL project that uses FIPS validated library. I duplicated the GCC compiler toolchain and modified it to use OpenSSL's fipsld (and set it as default). When the project's code executes under Code::Blocks via F8 , FIPS_mode_set fails with error 252104805 (0xF06D065). 0xF06D065 is: $ openssl errstr 0xF06D065 error:0F06D065:common libcrypto routines

-D option is expanded incorrectly from g++ command line

倖福魔咒の 提交于 2019-12-13 14:39:23
问题 In C++ CodeBlocks project I added the following definitions to the project settings, compiler settings, #define: _DEBUG DATA_DIR=\"/media/Shared/SiX/Data\" This produces the following g++ command line: g++ -Wall -g -fPIC -save-temps -D_DEBUG -DDATA_DIR=\"/media/Shared/SiX/Data\" -I../Includes -c /media/Shared/SiX/SiXConfiguration/PathManager.cpp -o obj/Debug/PathManager.o This code does not compile: char* commonDataDir; #ifdef DATA_DIR commonDataDir = DATA_DIR; #endif Looking at preprocessor

Error: 'Friend Member Function Name' was not declared in this scope

冷暖自知 提交于 2019-12-13 13:06:21
问题 I am in the process of moving all of my C++ Windows applications to Ubuntu Linux. This application runs fine on Visual Studio 2015 Community on Windows 7 OS. However, it gives an error when running in Code Blocks on Ubuntu Linux. I have replicated the error message I am getting using the following simple Person class. Error Message: 'comparePersonAge' was not declared in this scope Person.h #ifndef Person_h #define Person_h #include <string> class Person { private: int age; std::string name;

Id returned 1 exit status - CodeBlocks with wxWidgets

*爱你&永不变心* 提交于 2019-12-13 10:29:20
问题 I have installed wxWidgets for Code::Blocks, watched a tutorial on YouTube on how to do this, everything seemed fine. I created a new project, but I can't compile. I get an error. This is how a project looks when I create it, and I do not change nothing in it. Project when I created it And here is the error. ld.exe cannot find -lwxmsw28u 回答1: 1) In order to make it work, you need to go to settings-->Global Variables. My home directory for wxWidgets is C:\wxWidgets-3.1.0-tdmgcc32 and this is

Code::Blocks build from bash

大城市里の小女人 提交于 2019-12-13 08:52:18
问题 I'm developing a C++ application in Code::Blocks. My program has a few dependencies and has to run under Linux and Windows, this is why I use Code::Blocks. Now I'd like to include Travis CI for testing the builds. On the Travis server, where I have no X11, I won't be able to run Code::Blocks. How can I build my project without Code::Blocks. (Is there a possibility to create "a Makefile" out of the .cbp -file? This page (Code::Blocks Wiki) mentions there is a --build flag, but you need Code: