Is it possible to connect to a separate obj file using #pragma?

Is it possible to connect to a separate obj file using #pragma? I tried #pragma comment(lib, "disk_file_sink.obj") but it does not work. And it works if I specify this file in Linker / Input / Additional Dependencies.

+4
source share
1 answer

I have the same problem as you, and I browse many sites, but I do not get the result, so I use a different method to solve this problem. This is what I did. I use the lib command to compress objs in a library. You can use lib / out: xxx.lib one.obj two.obj or lib / out: xxx.lib * .obj. A team can add a project property.

+2
source

Source: https://habr.com/ru/post/1446079/


All Articles