Cannot create executable

2019-08-17 07:07发布

I had a project running pretty neat until I had to add a few features. The features was a few lines of code and a new .msg definition file. After the additions when build the program shows this message:

make MODE=debug CONFIGNAME=gcc-debug all 
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `mkdir -p "out/gcc-debug/" && echo "-g -Wall   -I/usr/include -fno-stack-protector  -DHAVE_PCAP -DXMLPARSER=libxml -DWITH_PARSIM -DWITH_NETBUILDER  -I"C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include" -I"C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn" -IC:/local/boost_1_58_0/ -I. -IC:/Users/LuisH.Forchesatto/Downloads/omnetpp-4.6/include" >out/gcc-debug//.last-copts'
Creating executable: out/gcc-debug//DB5.exe

The files of the project are below. I don't have the files before the modifications so is not possible to undo the changes. Once I posted here a similar issue and a few modifications to the makefile file solved gracefully, but this time it seems alright for me.

Dropbox link with the project files: https://dl.dropboxusercontent.com/u/85576999/Db5.rar

2条回答
等我变得足够好
2楼-- · 2019-08-17 07:31

The problem seems to be caused by having more than one .cc file which holds the nodes algorithm.

Putting all C++ code within the same file and including other routines via header (.h) files seems not to generate any errors.

查看更多
【Aperson】
3楼-- · 2019-08-17 07:32
  • Remove anything that is MYSQL related. You seem to be messed up the INCLUDE path.
  • Once your project compiles again, you may add mysql stuff again (if you need it BUT:
  • never use spaces in paths! Use the short filename form if you have to add something that is under a path with spaces.
  • never use \ use forward slashes. (\ is an escape character in the bash shell used by omnet)
  • finally: use version control software even if you do local development. (git is great for this).
查看更多
登录 后发表回答