This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Path porting between Win and LIn

Hi,

I have a complex project developed under windows that includes a lot of path for includes and libraries. Some of that paths are in the windows form ("C:\..") and obviously when I try to compile it under Linux this generates some errors.

I'm working with the native CCS6 under Linux (not wine).

There's a workaround to solve this using the same project under both OS?

Thank you

  • Hi Matteo,

    matteo lucarelli said:
    There's a workaround to solve this using the same project under both OS?

    I can very well understand the difficulties you're facing but there's no alternate way other than providing/specifying the exact include paths and linking directories again.

    Regards,

    Gautam

  • So there's no way to leave the project unchanged between LIN and WIN.

    Can I copy the project file and leave two of them in the project directory to be used on different systems?

    This would solve all because the source modification would be unaffected

  • matteo lucarelli said:
    Can I copy the project file and leave two of them in the project directory to be used on different systems?

    As you might already know that the file system and the directory structures are different in both the OS and hence I'm unable to understand how the above would work!

    Can you explain?

  • You might be able to use Path Variables to get around this issue.

    Create a new Path variable In the Project properties dialog select Resource-> Linked Resources and then use the path variable in the include path, i.e.

    "${PATH_VARIABLE}/...."

    For example,  CG_TOOL_ROOT is used in "${CG_TOOL_ROOT}/include".

    I haven't tried it, but there might some way to change the Path variables through configuration types (i.e. Linux_debug, Linux_release, Windows_debug and Windows_release).

  • Create several configurations as I previously stated. Then, in the Project Properties, go to the Build's Variables tab and add that path variable with a different path for each configuration.

    That should work.

  • This works for CCSv6.01.00040, however, I am not sure if will work with earlier versions. 

  • matteo lucarelli said:
    . Some of that paths are in the windows form ("C:\..") and obviously when I try to compile it under Linux this generates some errors.

    The biggest issue I have is the backslashes. Hence I tend to use forward slashes all the time. Do you have any backslashes?

  • The main problem is with the "C:", not with the slashes

  • oh, right. stevenh's suggestion of using variables would be the best solution.

  • I agree. Thank you