-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error CS1032: Cannot define/undefine preprocessor symbols after first token in file #36
Comments
There was a recent change to LSL.cs (commit here). I'm not sure why it was added but it causes this problem for us too. @Argzero do you think you could remove it and find another solution to your issue? In any case, if all you need is LSL.cs, then please use the version here: https://github.com/labstreaminglayer/liblsl-Csharp |
Thank you for the quick response! I changed the LSL version to the one you recommended.
I noticed that it was because there was no "const string" before liblsl, so I adjusted that on lines 888 and 885, but this just gives rise to many new errors. So I am assuming the current LSL version is not compatible with .Net 4.0 or with something else in my project? Thanks in advance! |
It's compatible. That's not the problem. I guess you're just on a code path that I didn't test. What OS and architecture are you on? |
Windows 10 and architecture X86_64. |
You're right about the But, after adding that, my colleague just tested LSL.cs in his Unity project with .Net 4.x and it worked fine. |
The errors that come up are all similar like this one:
This error pops up from each of the scripts in the examples that define "ConsoleApplication1". |
Ah, sorry I can't help you with LSL4Unity examples. In our Unity projects we only use LSL.cs (and the required liblsl64.dll). I think it's completely possible that the LSL4Unity examples are out-dated and might not work with the latest Unity and/or latest .Net framework. The good news is that LSL.cs (and the dll) work fine in Unity and really that's all you need to get going with LSL in Unity. |
I just realized that you might have been referring to the examples in liblsl-Csharp. Those are not intended to be used in Unity. Those are intended to be used as standalone C# executables. |
Ah okay, I am sorry for bothering you. |
Not at all. In the "Getting Help" paragraph in the main repository (here), there's a link for a Slack invite. Please join if you'd prefer a real-time conversation over the back-and-forth in GitHub issues. |
Dear developer(s) of labstreaminglayer,
I want to log head orientation data at a relatively high frequency in my Unity application and found your tool, which seems the perfect thing to solve my issue!
However, when following your wiki instructions on integrating LSL into my Unity project, I immediately got an error. When I place the folders of LSL into my assets folder in Unity, the following error compes up:
I am assume this is some compatibility issue with .NET? I am using Unity version 2019.1.2f1 Personal with .NET 4.x Equivalent.
I cannot downgrade .NET, because I had to upgrade to solve some other bugs. I also cannot easily check whether things work in a different Unity version, because I am using Oculus utilities and they don't always work well in different Unity versions.
When googling the error I found something on the .NET page (https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs1032), but this is not comprehensible to me.
Do you have any ideas on how to solve this issue?
Thanks anyway for developing this great tool!
Kind regards,
Hanne Huygelier
The text was updated successfully, but these errors were encountered: