Enes Ayyildiz
Enes Ayyildiz

Reputation: 1

I can not add library of Protobuf to Eclipse IDE

I want to add protobuf lib to eclipse ide. I am using protof 27.2 and mingw g++ 9.2 to compile code.

#include <iostream>
#include "C:\Users\PC_5725\Desktop\Eclipse\Protobuf_ornek1\ProtoEx1\Book.pb.h"
#include <fstream>




int main() {
    
    SearchRequest::SearchRequest search;


    return 0;
}

I am giving an error like this. I am not understand why the error occurred. maybe the g++ version or I can not linking the protobuf lib correctly.


c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: src\ProtoEx1.o:ProtoEx1.cpp:(.text.startup+0x41): undefined reference to `SearchRequest::SearchRequest::SearchRequest(google::protobuf::Arena*)'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: src\ProtoEx1.o:ProtoEx1.cpp:(.text.startup+0x4c): undefined reference to `SearchRequest::SearchRequest::~SearchRequest()'

enter image description here enter image description here

Upvotes: 0

Views: 19

Answers (0)

Related Questions