To specify a directory to search for (binary) libraries, you just use -L
:
-L/data[...]/lib
To specify the actual library name, you use -l
:
-lfoo # (links libfoo.a or libfoo.so)
To specify a directory to search for include files (different from libraries!) you use -I
:
-I/data[...]/lib
So I think what you want is something like
g++ -g -Wall -I/data[...]/lib testing.cpp fileparameters.cpp main.cpp -o test
These compiler flags (amongst others) can also be found at the GNU GCC Command Options manual:
Related Posts:
- How do I enable C++11 in gcc?
- How to install g++ in Cygwin?
- What is the difference between g++ and gcc?
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- javac is not recognized as an internal or external command, operable program or batch file [closed]
- How can I safely create a nested directory in Python?
- Graphviz’s executables are not found (Python 3.4)
- ‘git’ is not recognized as an internal or external command
- C++ undefined reference to defined function
- ow can I find where Python is installed on Windows?
- Graphviz’s executables are not found (Python 3.4)
- ‘git’ is not recognized as an internal or external command
- Different between ./ , ../ , ../../ , ~/ on file path(URL) in asp.net
- Importing modules from parent folder
- Importing modules from parent folder
- How to fix ingress 404 default backend
- How can I safely create a nested directory in Python?
- How does #include
work in C++? - Graphviz’s executables are not found (Python 3.4)
- ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL’s are there
- ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL’s are there
- Undefined reference to vtable
- Setting up enviromental variables in Windows 10 to use java and javac
- adb is not recognized as internal or external command, operable program or batch file
- make: g++: Command not found
- Undefined reference to vtable
- Compiling C++11 with g++
- Get current folder path
- Python Setup Disabling Path Length Limit Pros and Cons?
- “g++” is not recognized as an internal or external command, MinGW
- Python can’t find my module
- CSS Background Image Not Displaying
- Access to the path is denied
- Relative paths in Python
- How to get an absolute file path in Python
- Eclipse C++ : “Program “g++” not found in PATH”
- How to get the filename without the extension from a path in Python?
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- Python list directory, subdirectory, and files
- Open file in a relative location in Python
- Why am I getting a FileNotFoundError?
- “g++” is not recognized as an internal or external command, MinGW
- Compiling a C++ program with gcc
- CSS Background Image Not Displaying
- Visual C++ find line causing “Debug Assertion failed”
- Undefined reference to class constructor, including .cpp file fixes
- Relative paths in Python
- Relative paths in Python
- Eclipse C++ : “Program “g++” not found in PATH”
- What does __FILE__ mean?
- gcc/g++: “No such file or directory”
- Path to Powershell.exe (v 2.0)
- error: use of deleted function
- Undefined reference to constructor
- CSS Background Image Not Displaying
- How to change the Jupyter start-up folder
- expected unqualified-id before string constant
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- extra qualification error in C++
- How do I edit $PATH (.bash_profile) on OS X?
- C++ Error ‘nullptr was not declared in this scope’ in Eclipse IDE
- python is not recognized windows 10
- npm ERR! No git binary found in $PATH
- ‘strcmp’ was not declared in this scope
- scp from Linux to Windows
- Windows path in Python
- What is the difference between gcc/g++ and cc1/cc1plus?
- Error: free(): invalid next size (fast):
- C++ compile time error: expected identifier before numeric constant
- Error: free(): invalid next size (fast):
- g++ output: file not recognized: File format not recognized
- I get this error: “glibc detected”
- Update GCC on OSX
- G++ undefined reference to class::function
- Undefined reference to class constructor, including .cpp file fixes
- C++ Not Installed In Cygwin
- Running python script inside ipython
- Display current path in terminal only
- How to change pip installation path
- Regex Last occurrence?
- make -j 8 g++: internal compiler error: Killed (program cc1plus)
- Difference between
and - Getting a bunch of crosses initialization error
- Expected unqualified-id before ‘[‘ token
- Fatal error: iostream: No such file or directory in compiling C program using GCC
- What does “-Wall” in “g++ -Wall test.cpp -o test” do?
- Compiling C++11 with g++
- What is a .h.gch file?
- Update g++ but still old version
- Link error “undefined reference to `__gxx_personality_v0′” and g++ [duplicate]
- Unrecognized escape sequence for path string containing backslashes
- how to get wp-content folder in wordpress?
- How to remove the path with an nginx proxy_pass
- How do I set the global PATH environment variable on OS X?
- Adding a directory to $PATH in CentOS?
- How to keep the full path with rsync?