0

I did a program that need some functions from a file that the staff gives us. the file is libmap.a. I developed some modules that use functions from the libmap file.

how can I compile it? Some friends said me that I need to change something to the Cmake file. is someone know what I need to change?

sepp2k
  • 363,768
  • 54
  • 674
  • 675

1 Answers1

0

You do not compile, only link with the library file.

for gcc you need to use -l option in your case -lmap and if needed set the path using -L option.

in Cmake you need to set your library search path:

LINK_DIRECTORIES(your_target "directory")

and the add the library

TARGET_LINK_LIBRARIES(your_target map)
0___________
  • 60,014
  • 4
  • 34
  • 74