" a namespace name is not allowed" javacpp 中的错误

" a namespace name is not allowed" error in javacpp

本文关键字:javacpp 错误 allowed not namespace name is      更新时间:2023-10-16

我试图在我的java应用程序中使用这个例子,这是使用maven构建的。pom.xml包括

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
                <execution>
                    <id>javacpp</id>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>java</executable>
                        <arguments>
                            <argument>-jar</argument>       <argument>/home/JCuda/javacpp.jar</argument>
                            <argument>-classpath</argument> <argument>${project.build.outputDirectory}:/home/JCuda/jcuda-0.5.0.jar:/home/JCuda/jcusparse-0.5.0.jar</argument>
                            <argument>-d</argument>         <argument>${project.build.outputDirectory}/lib/</argument>
                            <argument>-properties</argument>    <argument>linux-x86_64-cuda</argument>
                        </arguments>
                    </configuration>
                </execution>
            </executions>
        </plugin>

nvcc编译.cu文件时显示错误
/home/TestWebapp6/target/classes/lib/jniCudaOps.cu(1154):错误:命名空间名称不允许
在代码中是这一行

JNIEXPORT void JNICALL Java_com_skenzo_cuda_CudaOps_copy(JNIEnv* env, jclass cls, jobject arg0, jobject arg1, jobject arg2) {
    thrust* ptr0 = arg0; //line showing the first error
    thrust* ptr1 = arg1;
....  

什么线索吗?

这个问题可能更适合javacpp邮件列表。