Author Topic: How to convert from cmd line to C::B  (Read 191 times)

Offline dkaip

  • Multiple posting newcomer
  • *
  • Posts: 29
How to convert from cmd line to C::B
« on: October 18, 2018, 12:46:46 pm »
Hello.
I just make pdfium library in linux.
Trying i small program for test all are ok in cmd line.
But how i import all settings in C::B cbp file?

Thank you
Jim.

Quote
g++  -pedantic -w -Wfatal-errors -Wextra -std=c++0x -pg -g -fexceptions -lstdc++ -O2 -c main.cpp -o main.o -Ifoo -fPIC
g++ -o pdftest -pg -ldl -s -Wl,--start-group main.o libpdfium.a -Wl,--end-group -lpthread
./pdftest

Code: [Select]
#include <iostream>
#include "fpdfview.h"

using namespace std;

int main()
{
    FPDF_LIBRARY_CONFIG config;
    config.version = 2;
    config.m_pUserFontPaths = NULL;
    config.m_pIsolate = NULL;
    config.m_v8EmbedderSlot = 0;
    FPDF_InitLibraryWithConfig(&config);
    FPDF_DestroyLibrary();
    cout<<"Hi ..";
    return 0;
}

I have problem in linker ...

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="pdfiumtest" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/pdfiumtest" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/pdfiumtest" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-pg" />
<Add option="-fexceptions" />
<Add option="-fPIC" />
<Add directory="../pdfiumtest" />
</Compiler>
<Linker>
<Add option="-s" />
<Add option="-pg" />
<Add option="-ldl" />
<Add option="-lpthread" />
<Add library="libpdfium.a" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>
<envvars />
<code_completion />
<lib_finder disable_auto="1" />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>





Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2062
Re: How to convert from cmd line to C::B
« Reply #1 on: October 18, 2018, 02:23:22 pm »
Please post the error log as described here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
[edit:] Thank you for the rest of the information like the cmd line. All is needed, but without the log it is hard to help...