codeblocks

Undefined reference to `SHA1'

空扰寡人 提交于 2019-12-12 10:18:09
问题 I'm posting here due to a problem with Code::Blocks I've recently created a project in linux which compiled and executed correctly. Now I am trying to made it work on windows. Problem When I tried to compile thanks to Code::Blocks I received the error : C:\Users\PC\Desktop\Collector\verification.c |44|undefined reference to `SHA1'| Here is my configuration : Right click on my project Then "Build options" In "Linker setting" i've got : -lws2_32 into the "Other linker options". In the "Search

stoi() CodeBlocks not working

烈酒焚心 提交于 2019-12-12 09:53:48
问题 I am using codeblocks and i can't make stoi() function work. I read other questions regarding this issue but I couldn't solve it. I checked C+11, I am using namespace std and I have the string header. I don't know how can I solve this problem. error: 'stoi' was not declared in this scope 回答1: found the answer on almost the same question here: "It seems your MinGW needs a patch: Enabling string conversion functions in MinGW" From this link you can download a .zip, than follow the instructions.

Codeblocks c++ multithreading huge error list

放肆的年华 提交于 2019-12-12 06:49:11
问题 I was playing around with some multithreading example code shown below (taken from from http://www.bogotobogo.com/cplusplus/multithreading_win32A.php) using codeblocks (build option was set to c++11). #include <windows.h> #include <iostream> #include <stdio.h> DWORD WINAPI myThread(LPVOID lpParameter) { unsigned int& myCounter = *((unsigned int*)lpParameter); while(myCounter < 0xFFFFFFFF) ++myCounter; return 0; } int main(int argc, char* argv[]) { using namespace std; unsigned int myCounter =

undefined reference to Class::Function() C++

落爺英雄遲暮 提交于 2019-12-12 04:18:58
问题 After searching for a solution to this for about a half an hour I have made no progress. The errors are as follows: s\My Workspace\Project\main.cpp - Line 7 - undefined reference to 'Sally::Sally()' s\My Workspace\Project\main.cpp - Line 9 - undefined reference to 'Sally::printCrap()' main.cpp #include <iostream> using namespace std; #include "Sally.h" int main() { Sally sallyObject; sallyObject.printCrap(); } Sally.h #ifndef SALLY_H #define SALLY_H class Sally { public: Sally(); void

codeblocks autocomplete / calltips not working for C standard library functions

久未见 提交于 2019-12-12 03:34:44
问题 I'm trying to start using code::blocks to do some C programming in just to learn. I was hoping to use the codecompletion / calltips feature (e.g. when typing say "printf" it popsup a handy dropdown box that shows the parameters. I've made a new project and a new file in that project called "hello.c" #include <stdio.h> int main(){ int test=0; printf("%d",test); return 0; } but midway through typing prin---only "priority_queue and private" show up, no printf functions, and nothing happens when

irrlicht : undefined reference to `XFree'

淺唱寂寞╮ 提交于 2019-12-12 03:32:38
问题 i using code::blocks and irrlicht but when i run my code i get a list of errors i don't know why my code are right and i use the version 1.8.3 from the lib and i definded it in the code::blocks options ||=== Build: Debug in shit2 (compiler: GNU GCC Compiler) ===| ../../irrlicht-1.8.3/source/Irrlicht/libIrrlicht.a(CIrrDeviceLinux.o)||In function irr::CIrrDeviceLinux::~CIrrDeviceLinux()':| /home/shar/irrlicht-1.8.3/source/Irrlicht/CIrrDeviceLinux.cpp|138|undefined reference to XFree'| /home

error while loading shared libraries

孤者浪人 提交于 2019-12-12 03:25:59
问题 I'm trying to install Code::Blocks from source. There is an `anarchy' folder on my university's CS department's mainframe, where anyone can install anything, basically. wxwidgets is a dependency of Code::Blocks, and I'm trying to put wxGTK, as it's called, into my own folder on `anarchy', which works fine. I then compile Code::Blocks with the correct configure flags so that it recognizes wxwidgets 2.8 during the installation. But then, when I want to run `codeblocks', it says codeblocks:

Error when compiling C file in GCC (multiple files in one)

淺唱寂寞╮ 提交于 2019-12-12 02:36:11
问题 The program justifies a string of text. Here is my code (main is justify.c) : justify.c #include <string.h> #include "line.h" #include "word.h" #define MAX_WORD_LEN 20 int main(void) { char word[MAX_WORD_LEN+2]; int word_len; clear_line(); for(;;) { read_word(word, MAX_WORD_LEN+1); word_len = strlen(word); if(word_len ==0) { flush_line(); return 0; } if (word_len >MAX_WORD_LEN) word[MAX_WORD_LEN]='*'; if(word_len + 1 > space_remainding()) { write_line(); clear_line(); } add_word(word); } }

serial communication with arm microcontroller

早过忘川 提交于 2019-12-12 02:09:41
问题 I am trying to send data from the arm cortrx m4 microcontroller to pc through usb. There is a program written in C++ language in codeblocks ide. Basically the program sets the serial communication settings and read data using ReadFile function. The problem is I am getting garbage values at the output even if the baud rate in pc proogram and microcontroller is same. How can I solve this problem? The pc program is shown below. #include <Windows.h> #include <stdio.h> int main(void) { HANDLE

Porting from Code::Blocks to Visual Studio 2010

本秂侑毒 提交于 2019-12-12 01:47:03
问题 Say I have a open source C::B C++ (non-C++11, perfectly compatible with the 1998 ISO standard) project I've downloaded which is using MinGW/GCC (TDM-1 4.7.1 or 4.7.2 - doesn't work with newest version),; can I port the source files from it to Visual Studio 2010 and be able to make it work without massive code rewriting? Or there are certain cases in which it won't be possible? Or it depends on various things? EDIT: The code relies on additional external utilities and libraries such as: Lua