Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other questionMy other question brought me further.


  1. Can I make #define private so that no other source file wont EVER be able to use the private defines ?

Answered: yes, in C or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other question brought me further.


  1. Can I make #define private so that no other source file wont EVER be able to use the private defines ?

Answered: yes, in C or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other question brought me further.


  1. Can I make #define private so that no other source file wont EVER be able to use the private defines ?

Answered: yes, in C or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.
replaced deprecated tag [define]
Source Link

I'm a C/C++ newbie and I'm having big trouble to create a working project. I have a few questions. They all seem to be connected.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other question brought me further.


1) Can I make `#define` private so that no other source file wont **EVER** be able to use the *private defines* ?
  1. Can I make #define private so that no other source file wont EVER be able to use the private defines ?

Answered: yes, in cC or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.

Thanks.

I'm a C/C++ newbie and I'm having big trouble to create a working project. I have a few questions. They all seem to be connected.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other question brought me further.


1) Can I make `#define` private so that no other source file wont **EVER** be able to use the *private defines* ?

Answered: yes, in c or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.

Thanks.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other question brought me further.


  1. Can I make #define private so that no other source file wont EVER be able to use the private defines ?

Answered: yes, in C or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.
added 141 characters in body
Source Link
Bitterblue
  • 14.2k
  • 18
  • 94
  • 133

I'm a C/C++ newbie and I'm having big trouble to create a working project. I have a few questions. They all seem to be connected.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other question brought me further.


1) Can I make `#define` private so that no other source file wont **EVER** be able to use the *private defines* ?

Answered: yes, in c or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.

Thanks.

I'm a C/C++ newbie and I'm having big trouble to create a working project. I have a few questions. They all seem to be connected.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

1) Can I make `#define` private so that no other source file wont **EVER** be able to use the *private defines* ?

Answered: yes, in c or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.

Thanks.

I'm a C/C++ newbie and I'm having big trouble to create a working project. I have a few questions. They all seem to be connected.

My project must be C++. I include:

  • glib-2.0
  • gtk+-2.0
  • pylon (C++)
  • genicam

My other question brought me further.


1) Can I make `#define` private so that no other source file wont **EVER** be able to use the *private defines* ?

Answered: yes, in c or cpp files (while their headers don't expose those defines)

  1. Do I have to include all libraries twice (for both compiler: GCC C, GCC C++) ? (I will be using C libraries in cpp files). And also for the linker ?

  2. I'm using `pkg-config --cflags --libs glib-2.0 gtk+-2.0` to fix some fatal errors of "file not found". But I still get them (e.g. glibconfig.h ~ file not found). Is there a foolproof fix for that ?

  3. Might the problem be that if I make a global #define null or something and then the included libraries that might have same define names bug around in my project ?


I started the project step by step including one library at a time and fixing issues if some arose. Then include next library and fix issues etc. I'm using eclipse, I have include guards and mixed c and cpp source files.

Thanks.

added 85 characters in body
Source Link
Bitterblue
  • 14.2k
  • 18
  • 94
  • 133
Loading
added 75 characters in body
Source Link
Bitterblue
  • 14.2k
  • 18
  • 94
  • 133
Loading
Source Link
Bitterblue
  • 14.2k
  • 18
  • 94
  • 133
Loading