CreateOctaveComponent error with "DSO Missing from command line" - octave

I've been trying to get Redhawk SDR to import an Octave M file. I initially started with Octave 3.8.2 and Redhawk 2.1.0. As another user discovered, this resulted in a do_octave_atexit error (do_octave_atexit missing? does createOctaveComponent work?) Despite the solutions in the answer, I was not able to get this to work. I then downgraded to Octave 3.6.4, as was also suggested. I now get the following error and I'm not sure how to overcome this fault.
The name of the file I'm attempting to port to Redhawk is named multByTwo.m. I've tried several files without any success. I can run the command without the --install parameter.
[root#localhost workspace]# createOctaveComponent --install multByTwo.m
multByTwo
Component multByTwo
build.sh
multByTwo.spec
Tests multByTwo
tests/test_multByTwo.py
Implementation: cpp
WARNING: cpp/Makefile.am.ide has been modified or is a user file that must be explicitly updated, use -f to overwrite
WARNING: cpp/multByTwo.cpp has been modified or is a user file that must be explicitly updated, use -f to overwrite
WARNING: cpp/multByTwo.h has been modified or is a user file that must be explicitly updated, use -f to overwrite
cpp/main.cpp
cpp/Makefile.am
cpp/configure.ac
cpp/build.sh
cpp/reconf
cpp/multByTwo_base.cpp
cpp/multByTwo_base.h
cpp/COPYING
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
./configure: line 2572: test: too many arguments
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for omniORB4... yes
checking for ossie home... /usr/local/redhawk/core
checking to see ossie is installed... checking for sdr root... /var/redhawk/sdr
configure: using /var/redhawk/sdr/ as installation prefix
checking whether make supports nested variables... (cached) yes
checking for PROJECTDEPS... yes
checking for INTERFACEDEPS... yes
checking for LOG4CXX... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for boostlib >= 1.41... yes
checking whether the Boost::System library is available... yes
checking for exit in -lboost_system... yes
checking whether the Boost::Thread library is available... yes
checking for exit in -lboost_thread... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex-mt... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
CXX multByTwo-main.o
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from main.cpp:19:
/usr/local/include/octave-3.6.4/octave/config.h:132:0: warning: "GETTIMEOFDAY_TIMEZONE" redefined [enabled by default]
#define GETTIMEOFDAY_TIMEZONE struct timezone
^
In file included from /usr/include/omniconfig.h:37:0,
from /usr/include/omniORB4/CORBA_sysdep.h:51,
from /usr/include/omniORB4/omniInternal.h:42,
from /usr/include/omniORB4/CORBA.h:65,
from /usr/local/redhawk/core/include/ossie/CF/cf.h:6,
from /usr/local/redhawk/core/include/ossie/ossieSupport.h:34,
from main.cpp:17:
/usr/include/omniORB4/acconfig.h:16:0: note: this is the location of the previous definition
#define GETTIMEOFDAY_TIMEZONE /**/
^
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from main.cpp:19:
/usr/local/include/octave-3.6.4/octave/config.h:2505:0: warning: "PACKAGE" redefined [enabled by default]
#define PACKAGE "octave"
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from main.cpp:19:
/usr/local/include/octave-3.6.4/octave/config.h:2520:0: warning: "PACKAGE_URL" redefined [enabled by default]
#define PACKAGE_URL "http://www.gnu.org/software/octave/"
^
In file included from /usr/include/omniconfig.h:37:0,
from /usr/include/omniORB4/CORBA_sysdep.h:51,
from /usr/include/omniORB4/omniInternal.h:42,
from /usr/include/omniORB4/CORBA.h:65,
from /usr/local/redhawk/core/include/ossie/CF/cf.h:6,
from /usr/local/redhawk/core/include/ossie/ossieSupport.h:34,
from main.cpp:17:
/usr/include/omniORB4/acconfig.h:263:0: note: this is the location of the previous definition
#define PACKAGE_URL ""
^
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from main.cpp:19:
/usr/local/include/octave-3.6.4/octave/config.h:2669:0: warning: "VERSION" redefined [enabled by default]
#define VERSION "3.6.4"
^
<command-line>:0:0: note: this is the location of the previous definition
CXX multByTwo-multByTwo_base.o
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo_base.cpp:16:
/usr/local/include/octave-3.6.4/octave/config.h:132:0: warning: "GETTIMEOFDAY_TIMEZONE" redefined [enabled by default]
#define GETTIMEOFDAY_TIMEZONE struct timezone
^
In file included from /usr/include/omniconfig.h:37:0,
from /usr/include/omniORB4/CORBA_sysdep.h:51,
from /usr/include/omniORB4/omniInternal.h:42,
from /usr/include/omniORB4/CORBA.h:65,
from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:,
from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25,
from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27,
from /usr/local/redhawk/core/include/ossie/Component.h:23,
from multByTwo_base.h:20,
from multByTwo_base.cpp:16:
/usr/include/omniORB4/acconfig.h:16:0: note: this is the location of the previous definition
#define GETTIMEOFDAY_TIMEZONE /**/
^
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo_base.cpp:16:
/usr/local/include/octave-3.6.4/octave/config.h:2505:0: warning: "PACKAGE" redefined [enabled by default]
#define PACKAGE "octave"
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo_base.cpp:16:
/usr/local/include/octave-3.6.4/octave/config.h:2520:0: warning: "PACKAGE_URL" redefined [enabled by default]
#define PACKAGE_URL "http://www.gnu.org/software/octave/"
^
In file included from /usr/include/omniconfig.h:37:0,
from /usr/include/omniORB4/CORBA_sysdep.h:51,
from /usr/include/omniORB4/omniInternal.h:42,
from /usr/include/omniORB4/CORBA.h:65,
from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:,
from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25,
from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27,
from /usr/local/redhawk/core/include/ossie/Component.h:23,
from multByTwo_base.h:20,
from multByTwo_base.cpp:16:
/usr/include/omniORB4/acconfig.h:263:0: note: this is the location of the previous definition
#define PACKAGE_URL ""
^
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo_base.cpp:16:
/usr/local/include/octave-3.6.4/octave/config.h:2669:0: warning: "VERSION" redefined [enabled by default]
#define VERSION "3.6.4"
^
<command-line>:0:0: note: this is the location of the previous definition
CXX multByTwo-multByTwo.o
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from multByTwo.cpp:28:
/usr/local/include/octave-3.6.4/octave/config.h:132:0: warning: "GETTIMEOFDAY_TIMEZONE" redefined [enabled by default]
#define GETTIMEOFDAY_TIMEZONE struct timezone
^
In file included from /usr/include/omniconfig.h:37:0,
from /usr/include/omniORB4/CORBA_sysdep.h:51,
from /usr/include/omniORB4/omniInternal.h:42,
from /usr/include/omniORB4/CORBA.h:65,
from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:,
from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25,
from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27,
from /usr/local/redhawk/core/include/ossie/Component.h:23,
from multByTwo_base.h:20,
from multByTwo.h:20,
from multByTwo.cpp:28:
/usr/include/omniORB4/acconfig.h:16:0: note: this is the location of the previous definition
#define GETTIMEOFDAY_TIMEZONE /**/
^
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from multByTwo.cpp:28:
/usr/local/include/octave-3.6.4/octave/config.h:2505:0: warning: "PACKAGE" redefined [enabled by default]
#define PACKAGE "octave"
^
<command-line>:0:0: note: this is the location of the previous definition
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from multByTwo.cpp:28:
/usr/local/include/octave-3.6.4/octave/config.h:2520:0: warning: "PACKAGE_URL" redefined [enabled by default]
#define PACKAGE_URL "http://www.gnu.org/software/octave/"
^
In file included from /usr/include/omniconfig.h:37:0,
from /usr/include/omniORB4/CORBA_sysdep.h:51,
from /usr/include/omniORB4/omniInternal.h:42,
from /usr/include/omniORB4/CORBA.h:65,
from /usr/local/redhawk/core/include/ossie/CF/LogInterfaces.h:,
from /usr/local/redhawk/core/include/ossie/Logging_impl.h:25,
from /usr/local/redhawk/core/include/ossie/Resource_impl.h:27,
from /usr/local/redhawk/core/include/ossie/Component.h:23,
from multByTwo_base.h:20,
from multByTwo.h:20,
from multByTwo.cpp:28:
/usr/include/omniORB4/acconfig.h:263:0: note: this is the location of the previous definition
#define PACKAGE_URL ""
^
In file included from /usr/local/include/octave-3.6.4/octave/oct.h:31:0,
from multByTwo_base.h:24,
from multByTwo.h:20,
from multByTwo.cpp:28:
/usr/local/include/octave-3.6.4/octave/config.h:2669:0: warning: "VERSION" redefined [enabled by default]
#define VERSION "3.6.4"
^
<command-line>:0:0: note: this is the location of the previous definition
CXXLD multByTwo
/usr/bin/ld: multByTwo-multByTwo_base.o: undefined reference to symbol '_ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE'
/usr/lib64/libboost_filesystem.so.1.53.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [multByTwo] Error 1
I get a few warnings, but it's not until the end where I get
/usr/lib64/libboost_filesystem.so.1.53.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
that it errors out. Similar issues on Stackoverflow have been resolved by adding various parameters to the command line. But in this case, the command line does not accept any other entries, as it's only >>createOctaveComponent --install fileName.m
Any thoughts?

The createOctaveComponent script seems to just invoke the code generators and create the associated Makefile.am and configure.ac files. The error you are getting is a linker error. It cannot find the symbol _ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE. Older versions of gcc would automatically add the link if it could, even though the user hadn't specified it so I'm assuming you are on a newer OS than CentOS6. The linker is helpful enough to tell you that this symbol is in /usr/lib64/libboost_filesystem.so.1.53.0 so you could simply add the -lboost_filesystem to the build but this isn't the preferred way since autotools should be used to locate the library and detect the name.
If you look at the generated Makefile.am file you'll see $(BOOST_LDFLAGS) $(BOOST_THREAD_LIB) $(BOOST_REGEX_LIB) $(BOOST_SYSTEM_LIB) but no boost filesystem. If you add $(BOOST_FILESYSTEM_LIB) and then add the corresponding AX_BOOST_FILESYSTEM to the configure.ac file you can rerun ./reconf && ./configure && make && make install and it should locate the proper boost filesystem library and add it to the linker call.

Related

How to suppress a warning in clang++?

I compiled the following c++ program:
int main() { 2==3; }
with:
clang++-5.0 -std=c++17 -Wunused-comparison prog.cpp
and got the warning:
warning: equality comparison result unused [-Wunused-comparison]
2==3;
~^~~
... so, probably this is not the correct way to suppress a warning in CLANG.
In the clang manual, this part is a "TODO".
What is the correct command-line flag to disable a warning?
In the clang diagnostic that you get from:
$ cat main.cpp
int main()
{
2==3;
return 0;
}
$ clang++ -c main.cpp
main.cpp:3:6: warning: equality comparison result unused [-Wunused-comparison]
2==3;
~^~~
1 warning generated.
the bracketed:
-Wunused-comparison
tells you that -Wunused-comparison is the enabled warning (in this case enabled by default) that was responsible for the diagnostic. So to suppress the diagnostic you explicitly disable that warning with the matching -Wno-... flag:
$ clang++ -c -Wno-unused-comparison main.cpp; echo Done
Done
The same applies for GCC.
In general, it is reckless to suppress warnings. One should rather enable them generously - -Wall -Wextra [-pedantic] - and then fix offending code.
add no warning flag as : -Wno-xxx :
https://releases.llvm.org/12.0.0/tools/clang/docs/DiagnosticsReference.html#diagnostic-flags
e.g.
enable the c++17 extension warning:
-Wc++17-extensions
suppress the c++17 extension warning:
-Wno-c++17-extensions

C code using gcc cannot link to mysql header?

I'd like to build on this post, because my symptoms are identical, but the solution seems to be something else.
I am working in a Ubuntu container (Ubuntu 16.04.3 LTS), trying to compile a toy C program that will eventually connect to an SQL server. First things first: I have the latest libmysqlclient-dev installed:
root#1234:/home# apt install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmysqlclient-dev is already the newest version (5.7.24-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 88 not upgraded.
root#1234:/home#
And when I look in the /usr/include/mysql directory, I see the critical header file I'll need:
root#1234:/home# ls -l /usr/include/mysql | grep mysql.h
-rw-r--r-- 1 root root 29207 Oct 4 05:48 /usr/include/mysql/mysql.h
root#1234:/home#
So far, so good. Now I found this little toy program from here:
#include <stdio.h>
#include "/usr/include/mysql/mysql.h"
int main() {
MYSQL mysql;
if(mysql_init(&mysql)==NULL) {
printf("\nInitialization error\n");
return 0;
}
mysql_real_connect(&mysql,"localhost","user","pass","dbname",0,NULL,0);
printf("Client version: %s",mysql_get_client_info());
printf("\nServer version: %s",mysql_get_server_info(&mysql));
mysql_close(&mysql);
return 1;
}
Now, following the advice of the previous post, I compile using the "-I" option to point to the mysql.h header file. (Yes, I am required to use GCC here):
root#1234:/home# gcc -I/usr/include/mysql sqlToy.c
/tmp/cc8c5JmT.o: In function `main':
sqlToy.c:(.text+0x25): undefined reference to `mysql_init'
sqlToy.c:(.text+0x69): undefined reference to `mysql_real_connect'
sqlToy.c:(.text+0x72): undefined reference to `mysql_get_client_info'
sqlToy.c:(.text+0x93): undefined reference to `mysql_get_server_info'
sqlToy.c:(.text+0xb4): undefined reference to `mysql_close'
collect2: error: ld returned 1 exit status
root#1234:/home#
Belly flop! The compiler has no idea what all the mySQL functions are, even though I've done all I can think of to point to that header file. As a sanity check, I made sure those mySQL functions are indeed in that header file; here's one as an example:
root#1234:/home# more /usr/include/mysql/mysql.h | grep mysql_init
libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
MYSQL * STDCALL mysql_init(MYSQL *mysql);
root#1234:/home#
So while I've pointed the compiler to the mysql.h header file in both my code AND with the "-I" option, it still has no clue what those 'mysql' functions are. The "-I" option was the solution in the previous post, but is not working for me here.
So... What might be the problem? I'm assuming this isn't a compiling problem, but maybe a linking one? In other words, I'm showing GCC where the mysql.h file is, but he is still not using it when processing the code?
Headers are not libraries. You are including the MySQL header during compilation, so these functions are defined, but you are not linking against the library which actually provides those functions.
These functions are provided by the libmysqlclient library, so you need to add the -lmysqlclient flag to your command line to fix this. (Note that this is a lower-case l, not an I.)
Additionally, since you are adding /usr/include/mysql to your system header path, you can include the library as
#include <mysql.h>
You do not need to -- and should not! -- specify the full path to the library in the #include directive.

Libvirt Build Failure On Fedora 17 After Update

I recently installed the updates for Fedora 17, among which was an upgrade from Linux Kernel 3.7.x to 3.8.x. Now I can't build Libvirt! It is giving me this error:
checking linux/if_bridge.h usability... no
checking linux/if_bridge.h presence... yes
configure: WARNING: linux/if_bridge.h: present but cannot be compiled
configure: WARNING: linux/if_bridge.h: check for missing prerequisite headers?
configure: WARNING: linux/if_bridge.h: see the Autoconf documentation
configure: WARNING: linux/if_bridge.h: section "Present But Cannot Be Compiled"
configure: WARNING: linux/if_bridge.h: proceeding with the compiler's result
configure: WARNING: ## ------------------------------------- ##
configure: WARNING: ## Report this to libvir-list redhat com ##
configure: WARNING: ## ------------------------------------- ##
checking for linux/if_bridge.h... no
How can I fix this so I can build Libvirt again?
Apparently the build failure was being caused by the header file /usr/include/linux/if_bridge.h. Fortunately the fix is quite easy (once you know what to do).
Open /usr/include/linux/if_bridge.h in a text editor
Add this include line, #include <netinet/ip6.h>
Rebuild
You will have to reapply this fix each time you boot into a different kernel version since the /usr/include/linux/ header files are wiped out.

Connecting MYSQL using C program in Eclipse

I am connecting the Mysql using c program in eclipse, I am using CYGWIN compiler to compile program. I have installed the mysql c connector and added the include files to the compiler and linker
but i am getting error
**** Build of configuration Debug for project DbConnectionC ****
make all
Building file: ../connection.c
Invoking: Cygwin C Compiler
gcc -I"C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -include"C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include\mysql.h" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"connection.d" -MT"connection.d" -o "connection.o" "../connection.c"
cygwin warning:
MS-DOS style path detected: D:\java\workspace\DbConnectionC\Debug
Preferred POSIX equivalent is: /cygdrive/d/java/workspace/DbConnectionC/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
../connection.c: In function `main':
../connection.c:57: warning: char format, different type arg (arg 2)
../connection.c:57: warning: char format, different type arg (arg 2)
../connection.c:61: warning: char format, different type arg (arg 2)
../connection.c:61: warning: char format, different type arg (arg 2)
Finished building: ../connection.c
Building target: DbConnectionC.exe
Invoking: Cygwin C Linker
gcc -L"C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\lib\opt" -o "DbConnectionC.exe" ./connection.o -llibmysql.lib -lmysqlclient.lib
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llibmysql.lib
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lmysqlclient.lib
collect2: ld returned 1 exit status
make: *** [DbConnectionC.exe] Error 1
makefile:29: recipe for target `DbConnectionC.exe' failed
**** Build Finished ****
Please help me on this
thanks in advance
In the first part you have some warnings about possible problems:
../connection.c:39: warning: implicit declaration of function `exit'
This means function exit() is not declared, your source needs an #include <stdlib.h>
../connection.c:46: warning: control reaches end of non-void function
You don't return a value at the end of main(), add a return 0; if the program succeeds.
In the second part are linker warnings:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llibmysql.lib
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lmysqlclient.lib
which means the linker needs a path to the libraries or the libraries do not exist or the library names are misspelled.
One possible solution is using -lmysql -lmysqlclient instead of -llibmysql.lib -lmysqlclient.lib, but I'm not that familiar with Windows.
Having said that, I suggest strongly, you look at https://stackoverflow.com/tags/c/info and look at some book links.

C MySQL API compiler warning problem with redefinition while including header files

I am compiling a simple c program to test the including of the library files on eclipse cygwin environment mysql-connector-c-6.0.2
The program
#include <my_global.h>
#include <mysql.h>
int main(int argv,char* argc[])
{
printf("my SQL libraries successfully included\n");
return 0;
}
I get the compiler errors as
cygwin warning:
MS-DOS style path detected: C:\MinGW\Workspace\sql_test\Debug
Preferred POSIX equivalent is: /cygdrive/c/MinGW/Workspace/sql_test/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
In file included from ../sql_test.c:8:
D:\mysql-connector-c-6.0.2\include/my_global.h:1416:1: warning: "floatget" redefined
D:\mysql-connector-c-6.0.2\include/my_global.h:1232:1: warning: this is the location of the previous definition
D:\mysql-connector-c-6.0.2\include/my_global.h:1417:1: warning: "floatstore" redefined
D:\mysql-connector-c-6.0.2\include/my_global.h:1231:1: warning: this is the location of the previous definition
D:\mysql-connector-c-6.0.2\include/my_global.h:1418:1: warning: "doubleget" redefined
D:\mysql-connector-c-6.0.2\include/my_global.h:1220:1: warning: this is the location of the previous definition
D:\mysql-connector-c-6.0.2\include/my_global.h:1419:1: warning: "doublestore" redefined
D:\mysql-connector-c-6.0.2\include/my_global.h:1225:1: warning: this is the location of the previous definition
Finished building: ../sql_test.c
I have verified the my_global.h file and the deceleration of these seems to be valid.
How to turn of these redefinition errors?
Where in eclipse and How do i set this "CYGWIN environment variable option "nodosfilewarning" to turn off this warning".
Here you can see the header file my_global.h of
For the warning, define CYGWIN=nodosfilewarning in the OS environment (control panel -> system -> advanced -> environment variables). If that doesn't work, try logging out to make sure nothing is using the old environment.
For the redefine errors, as Bo says, the compiler is telling you exactly where your mistakes are. If you don't understand them, then you should at least post those lines as part of your question.