heroiclabs / nakama-cpp

Generic C/C++ client for Nakama server.
https://heroiclabs.com/docs/cpp-client-guide
Apache License 2.0
69 stars 25 forks source link

XCODE gives "Linker Command Failed with Exit Code 1" on 2.5.1 and 2.4.0 #53

Closed jkaplan55 closed 1 year ago

jkaplan55 commented 2 years ago

This may be something I'm doing wrong, but I've followed the instructions in the readme to the best of my knowledge and I am unable to make it work.

I am aware there was an issue with 2.5.0, but I cannot build with 2.5.1 or 2.4.0 either.

The instructions say:

  1. Add NAKAMA_CPP_SDK/include in Build Settings > Header Search Paths
  2. Add libs folder in Build Settings > Library Search Paths: NAKAMA_CPP_SDK/libs/mac - for Mac

image

  1. In General > Frameworks, Libraries, and Embedded Content add following: all .a files located in libs folder foundation and security frameworks

image

I get "Linker Command Failed with Exit Code 1" image

Thank you in advance for any assistance.

Here is my program, in case that helps: image

mofirouz commented 2 years ago

Hiya - thanks for reporting this. We'll take a look and respond (cc @redbaron). In the meantime, we are experimenting with overhauling the C++ SDK - if you are open to it, I'd love to learn a little bit more about what you are building, target deployment and integration so that we can ensure the new C++ SDK works for you. Please email me at mo@heroiclabsDOTcom - thanks!

jkaplan55 commented 2 years ago

Hi Mo, I sent some additional information to your email. Any news on what's happening here with MacOS build? Am I missing something from the instructions?

My project is ready for release just as soon as I can get Nakama to build on MacOS. Thank you for taking a look.

jkaplan55 commented 2 years ago

Greetings!

I am encountering the same issue with v2.4.1. I have attached my project file (it's quite small). I believe I've followed the instructions in the Readme precisely. Would it be possible for somebody to take a look at this. Any feedback, even "it works fine on my computer," would be a big help.

I am missing out on important opportunities to share my work because I cannot get Nakama to build on MacOS. Any assistance would make a big difference. Thank you!

Nakama MacBuildTest.zip

jkaplan55 commented 2 years ago

An update here. It looks like the linker errors are occuring when I create the default client.

This builds:

    NLogger::initWithConsoleSink(NLogLevel::Debug);
    NClientPtr client;
    NClientParameters parameters;
    //client = createDefaultClient(parameters);

This gives linker errors related to boost, as picture above.:

    NLogger::initWithConsoleSink(NLogLevel::Debug);
    NClientPtr client;
    NClientParameters parameters;
    client = createDefaultClient(parameters);

Getting pretty desperate here. I hope someone can help. Thank you!

lugehorsam commented 1 year ago

Hey @jkaplan55 we've reworked the build system and this issue should be resolved.

jkaplan55 commented 1 year ago

I'm so glad to hear this is released! Thank you!

On Mon, Sep 19, 2022 at 12:20 PM Luke @.***> wrote:

Hey @jkaplan55 https://github.com/jkaplan55 we've reworked the build system and this issue should be resolved.

— Reply to this email directly, view it on GitHub https://github.com/heroiclabs/nakama-cpp/issues/53#issuecomment-1251443225, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWHZJ5BMPKSXZPN7AMW65ILV7C4IFANCNFSM5PDHBGYA . You are receiving this because you were mentioned.Message ID: @.***>