Linux Makefile with duplicate filenames in different folders


#1

Hi,

The version of JUCE is 1.52 (downloaded May 20). I have source files with the same name that are in different subfolders. Mac and Windows compilations seem okay, but Linux Makefile is not. The object files for the same source files with different folders are the same. It seems that I have to change source file names so that all of source files are unique.

Thank you,

Sang Chul


#2

Ok, thanks for letting me know, that’s easily fixed…


#3

Hi,

Thank you for the quick reply.

This may be a different issue. The files with the same name are OS-specific: e.g., a subfolder win32/a.cpp and another subfolder posix/a.cpp. I think that what I needed for JUCER is a capability of having different targets by including different source files under a single JUCER project. I am not sure if this is already implemented in JUCER, which I could not find. For now, I can achieve that by manually editing JUCER project using JUCER or OS-specific project files (Windows VC project file): i.e., for Linux I can simply open JUCER project file and uncheck the compile option, and for Windows I can remove posix/a.cpp file from solution explorer.

Another workaround is to add conditional compilation for different files; e.g., I defined COMPILE_MAC macro and wrapped the content of win32/a.cpp with the COMPILE_MAC using #ifndef, and wrapped the content of posix/a.cpp with COMPILE_MAC using #ifdef. This seems work with MacOS Xcode, but neither with Windows nor with Linux Makefile. So, I manually edited JUCER file for Linux Makefile using JUCER and VC++ project file using VC++ solution explorer.

I hope that JUCER could allow multiple targets if that is not implemented yet.

Thank you,

Sang Chul


#4

I use quite a few platform-specific files, but find it’s better to include everything in all your project targets, and conditionally compile them. Then, whichever IDE you’re using, you have all your files available to edit and search, even if they don’t get compiled on that platform.

There are obviously already JUCE_WINDOWS, JUCE_MAC, etc. macros that you can use for conditional compilation, you don’t need to bother defining your own.

BTW I think I’ve sorted out the linux name-clashing, it’s checked in now.


#5

Thank you for the reply. I will check it out.

Thank you,

Sang Chul