[Dev-C++] changing project linking from 'C' to 'CPP'
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: seb_kramm <seb...@ya...> - 2005-02-09 15:55:21
|
Hi everybody, I'm using devcpp 4.9.9.1 and I have a problem with the linker: I'm using an open-source library that can be used through C or C++. My own project is 'C' type, and I get now linker errors (I just changed some stuff in my code that needs now to be compiled/linked as CPP). So the question is: How do you force Devcpp to use 'CPP' instead of 'CC', for linking, in the generated makefile (through the project option dialog, I mean) If you change the file-compile settings, checking the 'compile as cpp' box, then, OK, the 'compile line' in the makefile looks like: $(CPP) -c main.c -o main.o $(CXXFLAGS) but the linker command still looks like: $(BIN): $(OBJ) $(CC) $(LINKOBJ) -o "my_project.exe" $(LIBS) and it --must-- look like: $(BIN): $(OBJ) $(CPP) $(LINKOBJ) -o "my_project.exe" $(LIBS) and this is what causes my linking to crash... The only turnaround I found is : Solution 1: to manually change the value of the 'IsCpp' line from 0 to 1 (in the .dev file) Solution 2: create a new project as cpp, and reconfigure the whole thing These are not very satisfying. If not possible for the moment, maybe that could be something to do for the next release ? (adding a check box in the 'project settings' dialog box, making it possible to quickly switch project type) Thank you. |