The INCLUDE_DIRS is invalid?

Sysprogs forums Forums VisualGDB The INCLUDE_DIRS is invalid?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #803
    Anonymous
    Participant

    I want to test remote compile on my c++ project.
    The source tree looks like:
    > base
    TestBit.cpp
    > main
    TestPCH.h

    I have been edit the debug.mak file as:
    INCLUDE_DIRS := /home/yyz/C/Bex/Bex/test/main /home/yyz/C/Bex/Bex/src /home/yyz/C/Bex/boost/include

    But, when I press F5 to start compile, I find the compile command line also likes:
    1>Rebuild:
    1> VisualGDB: Attempting inline build…
    1> VisualGDB: Run “make CONFIG=Debug clean” in directory “/tmp/VisualGDB/g/Linux/github/Bex/Bex/_build/test_linux” on yyz@192.168.1.104 (SSH)
    1> rm -rf Debug
    1> VisualGDB: Sending 4 updated source files to build machine…
    1> VisualGDB: Run “make CONFIG=Debug” in directory “/tmp/VisualGDB/g/Linux/github/Bex/Bex/_build/test_linux” on yyz@192.168.1.104 (SSH)
    1> mkdir Debug
    1> g++ -ggdb -ffunction-sections -O0 -DDEBUG -c test/base/TestBit.cpp -o Debug/TestBit.o -MD -MF Debug/TestBit.dep
    1>G:LinuxgithubBexBextesttestbaseTestBit.cpp(1,21): fatal error : TestPCH.h: No such file or directory
    1> #include “TestPCH.h”
    1> ^
    1> compilation terminated.
    1> make: *** [Debug/TestBit.o] Error 1
    1>

    1> Command exited with code 2
    1> Executable: make
    1> Arguments: CONFIG=Debug
    1> Directory: /tmp/VisualGDB/g/Linux/github/Bex/Bex/_build/test_linux
    1>VisualGDB : error : Command-line action failed

    What am I doing wrong ?

    #3101
    support
    Keymaster

    Hi,

    First of all, please check that the flags.mak has been saved and successfully deployed to the Linux machine. If it has been deployed, double-check the Makefile. The following lines are responsible for using INCLUDE_DIRS:

    
    CFLAGS += $(addprefix -I,$(INCLUDE_DIRS))
    CXXFLAGS += $(addprefix -I,$(INCLUDE_DIRS))
    ...
    $(BINARYDIR)/%.o : %.cpp $(all_make_files) |$(BINARYDIR)
    $(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep)
    

    If the Makefile looks correct, but INCLUDE_DIRS is still ignored, you can experiment with it by modifying CXXFLAGS/INCLUDE_DIRS directly from the Makefile. If overriding the value at some line has no effect, most likely it is overridden somewhere after that line.

    #3102
    Anonymous
    Participant

    Thanks for reply!

    I have been checked Makefile, I think it is correctly.
    But I cann’t find the flags.mak file in my msvc project, where is it?

    #3103
    Anonymous
    Participant

    Oh….

    Today, I change the VisualGDB to version 4.1. The compiler command line is correct!
    I think it maybe has some bugs in version 4.2.

    #3100
    support
    Keymaster

    Hi,

    Sorry, please check debug.mak, not flags.mak.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.