Answer the question
In order to leave comments, you need to log in
How to compile a program so that it works everywhere (g++)?
Hello! The question is: how should a program be compiled so that it can run on any machine (Intel and AMD) with optimizations enabled? Link to the program (my chess engine): https://github.com/sovaz1997/Zevra
Answer the question
In order to leave comments, you need to log in
1. separate the optimized functionality into a separate library.
2. compile it with various optimizations
3. in your code - decide on the plug-in version
4. connect it.
But it's probably easier to use source distribution and "in-place" building.
1) The start module determines the type of processor used
2) Based on the results of the check, a dynamic connection of modules (.so) is called for the detected architecture.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question